﻿@model UsersCheck

@{
    ViewBag.Title = "Set Permission";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Set Permission for Account: @Model.FullName</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        @*<legend>UsersCheck</legend>*@

        <div class="editor-label">
            @Html.LabelFor(model => model.OfficeName)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.OfficeName, new { disabled = "disabled", @readonly = "readonly" })
            @Html.ValidationMessageFor(model => model.OfficeName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LoginName)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.LoginName, new { disabled = "disabled", @readonly = "readonly" })
            @Html.ValidationMessageFor(model => model.LoginName)
        </div>

         <div class="editor-label">
            @Html.LabelFor(model => model.FullName)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.FullName, new { disabled = "disabled", @readonly = "readonly" })
            @Html.ValidationMessageFor(model => model.FullName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IsEnable)
        </div>
        <div class="editor-field">
            @Html.CheckBoxFor(model => model.IsEnable)
            @Html.ValidationMessageFor(model => model.IsEnable)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IsCEO)
        </div>
        <div class="editor-field">
            @Html.CheckBoxFor(model => model.IsCEO)
            @Html.ValidationMessageFor(model => model.IsCEO)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Piority)
        </div>
        <div class="editor-field">
            @(Html.Telerik().IntegerTextBoxFor(model => model.Piority)
                               .Name("Piority")
                                   .MinValue(1)
                                   .MaxValue(100)
                                    .Spinners(true).Value(1)                                
                )
            @Html.ValidationMessageFor(model => model.Piority)
            @Html.HiddenFor(model => model.ID)
        </div>

        <p class="dvbutton">
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
